package edu.whut.jdk7.date;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;
/*
计算你来到这个世界多少天
 */
public class DateTest01 {
    public static void main(String[] args) throws ParseException {
        System.out.println("请按照格式输入：2002.05.15");
        Scanner sc = new Scanner(System.in);
        String bir = sc.next();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy.MM.dd");
        Date date1 = simpleDateFormat.parse(bir);
        Date date2 = new Date();
        long time = date2.getTime() - date1.getTime();

        double re = time/1000/60/60/24;
        System.out.println(re);


    }
}
